package com.grupoconstruobras.sigo.persistence;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the rol_permiso database table.
 * 
 */
@Embeddable
public class RolPermisoPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="sec_rol", insertable=false, updatable=false, unique=true, nullable=false)
	private Integer secRol;

	@Column(name="sec_permiso", insertable=false, updatable=false, unique=true, nullable=false)
	private Integer secPermiso;

	public RolPermisoPK() {
	}
	public Integer getSecRol() {
		return this.secRol;
	}
	public void setSecRol(Integer secRol) {
		this.secRol = secRol;
	}
	public Integer getSecPermiso() {
		return this.secPermiso;
	}
	public void setSecPermiso(Integer secPermiso) {
		this.secPermiso = secPermiso;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof RolPermisoPK)) {
			return false;
		}
		RolPermisoPK castOther = (RolPermisoPK)other;
		return 
			this.secRol.equals(castOther.secRol)
			&& this.secPermiso.equals(castOther.secPermiso);
	}

	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.secRol.hashCode();
		hash = hash * prime + this.secPermiso.hashCode();
		
		return hash;
	}
}